package com.google.code.kritter.data;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MessageStat {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private Date date;

    @Persistent
    private int newMessageCount;

    @Persistent
    private int lastMessage;
    
    public MessageStat(Date date, int newMessageCount, int lastMessage) {
    	this.date = date;
    	this.newMessageCount = newMessageCount;
    	this.lastMessage = lastMessage;
    }
    

    // Accessors for the fields.  JDO doesn't use these, but your application does.

    public Long getId() {
        return id;
    }
    
    public Date getDate() {
    	return date;
    }
    
    public int getNewMessageCount() {
    	return newMessageCount;
    }

    public int getLastMessage() {
    	return lastMessage;
    }
}
